Ext.namespace('iOS.Util');

Ext.define('Util', {
    /*
     * 创建闭包保证函数运行时的宿主对象 
     */
    CreateDelegate: function(fn, obj, args) {
        return function() {
            args         = args || [];
            var callArgs = Array.prototype.slice.call(arguments, 0);
            callArgs     = callArgs.concat(args);
            obj = obj || window;
            return ($.isFunction(fn) ? fn : obj[fn]).apply(obj, callArgs);
        };
    }
});

iOS.Util = new Util();
